package util;

import java.util.ArrayList;
import java.util.List;
import domain.Contact;

/**
 * A container of {@link Contact} which does not accept double values.
 * @author Michel & Vincent
 *
 */
public class ContactsContainer {

	public List<Contact> contacts;

	public ContactsContainer() {
		super();
		contacts = new ArrayList<Contact>();
	}

	public void add(Contact m) {
		if (!contacts.contains(m)) {
			contacts.add(m);
		}
	}
	
	public List<Contact> getContacts() {
		return contacts;
	}
	
	public boolean isEmpty() {
		return contacts.size() == 0;
	}
	
	public Contact pop() {
		return contacts.remove(0);
	}
}
